package com.demo.starter.config;

import com.demo.starter.properties.HelloProperties;
import com.demo.starter.service.HelloService;
import com.demo.starter.service.impl.HelloServiceImpl;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 配置类
 *
 * @Author: ganbo
 * @Date: 2019/12/23 16:14
 */
@Configuration
@EnableConfigurationProperties(HelloProperties.class)
public class HelloAutoConfigure {

    @Bean
    public HelloService helloService(HelloProperties helloProperties) {
        return new HelloServiceImpl(helloProperties);
    }
}
